Ext.define('AmpleHarvest.objects.search.template.grid.cGEStandard',
		{
			extend			: 'Ext.AbstractComponent',
			statics			:
			{
				C_STR_FIELD_PUBLISH_DATE	: "publish_date",
				C_STR_FIELD_HARVEST_DATE	: "harvest_date",
				C_STR_FIELD_INDEX_DATE		: "index_date",
				C_STR_FIELD_SCORE			: "score",
				C_STR_FIELD_CONTENT			: "content",
				C_STR_FIELD_COST			: "value.cost",
				C_STR_FIELD_CUSTOMER		: "string.customer",
				C_STR_FIELD_ID				: "id",
				C_STR_FIELD_TITLE			: "title"

			},
			m_arr_Fields	: [],
			perPage			: 50,
			type			: "grid",
			constructor		: function(str_HTML)
			{
				this.m_arr_Fields =
				[
						this.self.C_STR_FIELD_PUBLISH_DATE,
						this.self.C_STR_FIELD_HARVEST_DATE,
						this.self.C_STR_FIELD_INDEX_DATE,
						this.self.C_STR_FIELD_SCORE,
						this.self.C_STR_FIELD_CONTENT,
						this.self.C_STR_FIELD_ID, this.self.C_STR_FIELD_TITLE,
						this.self.C_STR_FIELD_COST,
						this.self.C_STR_FIELD_CUSTOMER
				];
				this.columns =
				[
						{
							header		: 'Title',
							dataIndex	: this.convert2Field(this.self.C_STR_FIELD_TITLE),
							sortable	: false,
							flex		: 3
						},
						{
							header		: 'Customer',
							dataIndex	: this.convert2Field(this.self.C_STR_FIELD_CUSTOMER),
							sortable	: false,
							flex		: 1
						},
						{
							header		: 'Cost',
							dataIndex	: this.convert2Field(this.self.C_STR_FIELD_COST),
							sortable	: false,
							flex		: 1,
							align		: 'right',
							renderer	: function(str_Value)
							{
								return Ext.util.Format.number(str_Value,"0,0.00");
							}
						},
						{
							header		: 'Publish Date',
							dataIndex	: this.convert2Field(this.self.C_STR_FIELD_PUBLISH_DATE),
							flex		: 1,
							
							renderer	: function(str_Value)
							{
								return Ext.util.Format.date(str_Value,"d/M/Y H:i:s T");
							}
						},
						{
							header		: 'Harvest Date',
							dataIndex	: this.convert2Field(this.self.C_STR_FIELD_HARVEST_DATE),
							flex		: 1,
							
							renderer	: function(str_Value)
							{
								return Ext.util.Format.date(str_Value,"d/M/Y H:i:s T");
							}
						},
						{
							header		: 'Index Date',
							dataIndex	: this.convert2Field(this.self.C_STR_FIELD_INDEX_DATE),
							flex		: 1,
							
							renderer	: function(str_Value)
							{
								return Ext.util.Format.date(str_Value,"d/M/Y H:i:s T");
							}
						}
				]

			},
			get_Fields		: function()
			{
				var arr_Output = [];
				for(I=0 ;I< this.m_arr_Fields.length;I++)
				{
					arr_Output.push(this.convert2Field(this.m_arr_Fields[I]));
				}
				return arr_Output;
			},
			convert2Field :function(str_Input)
			{
				return str_Input.replace(".","_");
			}
			

		});
